load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "rditer",
    srcs = [
        "replica_data_iter.go",
        "select.go",
        "stats.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/kv/kvserver/rditer",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/keys",
        "//pkg/kv/kvserver/spanset",
        "//pkg/roachpb",
        "//pkg/settings/cluster",
        "//pkg/storage",
        "//pkg/storage/enginepb",
        "//pkg/storage/fs",
        "//pkg/util/iterutil",
        "//pkg/util/uuid",
        "@com_github_cockroachdb_pebble//:pebble",
        "@com_github_cockroachdb_pebble//rangekey",
    ],
)

go_test(
    name = "rditer_test",
    size = "small",
    srcs = [
        "replica_data_iter_test.go",
        "select_test.go",
        "stats_test.go",
    ],
    data = glob(["testdata/**"]),
    embed = [":rditer"],
    deps = [
        "//pkg/keys",
        "//pkg/kv/kvserver/concurrency/lock",
        "//pkg/kv/kvserver/spanset",
        "//pkg/roachpb",
        "//pkg/settings/cluster",
        "//pkg/storage",
        "//pkg/storage/enginepb",
        "//pkg/storage/fs",
        "//pkg/testutils",
        "//pkg/testutils/datapathutils",
        "//pkg/testutils/echotest",
        "//pkg/testutils/skip",
        "//pkg/util/hlc",
        "//pkg/util/leaktest",
        "//pkg/util/protoutil",
        "//pkg/util/randutil",
        "//pkg/util/uuid",
        "@com_github_olekukonko_tablewriter//:tablewriter",
        "@com_github_stretchr_testify//assert",
        "@com_github_stretchr_testify//require",
    ],
)
